select odd or even records from a table